package com.xxxx;

import com.xxxx.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext fc = new  // 绝对路径
                FileSystemXmlApplicationContext("C:\\Users\\Jar\\Desktop\\ssmproject\\spring_10_container\\src\\main\\resources\\beans.xml");
        BookDao b1 = fc.getBean("bookDao", BookDao.class); // 反射
        BookDao b2 = fc.getBean(BookDao.class); // 反射
        BookDao bookDao = (BookDao) fc.getBean("bookDao"); // 强转
        b2.m1();
    }
}